/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import java.io.Serializable;
import java.util.Calendar;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Alexandre
 */

@Entity
public class Comentario implements Serializable{
    
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    private String texto;
    @Temporal(TemporalType.TIMESTAMP)
    private Calendar dataPublica;
    @ManyToOne
    private Usuario userPublica;

    public Calendar getDataPublica() {
        return dataPublica;
    }

    public void setDataPublica(Calendar dataPublica) {
        this.dataPublica = dataPublica;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTexto() {
        return texto;
    }

    public void setTexto(String texto) {
        this.texto = texto;
    }

    public Usuario getUserPublica() {
        return userPublica;
    }

    public void setUserPublica(Usuario userPublica) {
        this.userPublica = userPublica;
    }
    
    
}
